﻿namespace Lib.Configuration.Entitys;
/// <summary>
/// 文字水印配置实体类
/// </summary>
public partial class Text {
    /// <summary>
    /// 创建实例
    /// </summary>
    public static Text Create {
        get {
            return new Text();
        }
    }
    /// <summary>
    /// 构造函数
    /// </summary>
    public Text() { }
    /// <summary>
    /// 初始化默认值
    /// </summary>
    public void Initialize() {
        if (string.IsNullOrEmpty(FontStyle)) {
            FontStyle = "Regular";
        }
        if (string.IsNullOrEmpty(FontFamily)) {
            FontFamily = "微软雅黑";
        }
        if (string.IsNullOrEmpty(FontColor)) {
            FontColor = "#000000";
        }
        if (!FontSize.HasValue || FontSize == 0) {
            FontSize = 20;
        }
    }
    /// <summary>
    /// 水印文字
    /// </summary>
    public string Key { get; set; }
    /// <summary>
    /// 字体种类
    /// </summary>
    public string FontFamily { get; set; }
    /// <summary>
    /// 字体大小
    /// </summary>
    public int? FontSize { get; set; }
    /// <summary>
    /// 字体颜色
    /// </summary>
    public string FontColor { get; set; }
    /// <summary>
    /// 字体样式
    /// </summary>
    public string FontStyle { get; set; }

}

